# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=deepin-grand-search
pkgver=5.4.2
pkgrel=1
pkgdesc='System-wide desktop search for DDE'
arch=('loong64' 'x86_64')
url="https://github.com/linuxdeepin/dde-grand-search"
license=('GPL3')
depends=(deepin-anything deepin-daemon deepin-qt5integration poppler-qt5)
makedepends=(cmake deepin-dock ninja qt5-tools)
groups=(deepin-extra)
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/dde-grand-search/archive/$pkgver.tar.gz"
62.patch)
sha512sums=('0ba2f13d799ec3973c5b36e4a317af770f5658f18e487a6f6e629733caac2726f8eac021dba53b9eae71d7b03d15223824cfab0d46c45b4ec6ef27627e9519c6'
            'f53946e6796c83bd48f2b1643492d6d54a2ecb87ae952b19fcf242f7a688b9d572a395fc89bed10de5d2f47e0953f1ef5a6a4a32493bbdf61b8eb4d5db20132c')

prepare() {
  cd dde-grand-search-$pkgver
  patch -p1 -i $srcdir/62.patch
  sed -i 's/-fPIE -pie//g' src/*/CMakeLists.txt
}

build() {
  cd dde-grand-search-$pkgver
  cmake -GNinja .
  ninja
}

package() {
  cd dde-grand-search-$pkgver
  DESTDIR="$pkgdir" ninja install
}
